<template>
  <div class="item-list">
    <a v-for="item in items" :key="item.id" class="item-card" href="#">
      <img :src="item.picture" class="item-image">
      <div class="item-content">
        <h3 class="item-title">{{ item.label }}</h3>
        <p class="item-price">¥{{ item.price }}</p>
        <p class="item-description">{{ item.description }}</p>
      </div>
    </a>
  </div>
</template>

<style scoped>
.item-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  transition: box-shadow 0.3s;
  min-width: 240px;
}

@media (max-width: 1200px) {
  .item-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .item-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .item-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
.item-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.item-price {
  color: #e4393c;
  font-weight: bold;
  font-size: 18px;
}

.item-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

.item-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px;
}
</style>

<script setup>
defineProps({
  items: {
    type: Array,
    default: () => []
  }
})
</script>